package com.example.service;


import com.example.config.Configuration;
import com.example.dto.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@Component
public class HelloServiceFallBack implements HelloService1{

    @Override
    @RequestMapping("hello")
    public  String hello(){
        return "error";
    };

    @Override
    @RequestMapping(value = "hello1",method = RequestMethod.GET)
    public String hello1(@RequestParam("name") String name){
        return "error";
    };
    @Override
    @RequestMapping(value = "hello2",method = RequestMethod.GET)
    public User hello2(@RequestHeader("name") String name, @RequestHeader("age") Integer age){
        return new User("weizhi",0);
    };
    @Override
    @RequestMapping(value = "hello3",method = RequestMethod.POST)
    public String hello3(@RequestBody User user){
        return "error";
    };
}
